package net.micro.controller;


import cn.hutool.json.JSONUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import net.micro.core.controller.BaseController;
import net.micro.domain.AjaxResult;
import net.micro.dto.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Chen
 * @since 2023-10-30
 */
@Tag(name = "用户模块")
@RestController
@RequestMapping("/api/user/v1/")
public class UserController extends BaseController {


    @Operation(summary = "登录", description = "登录")
    @GetMapping(value = "/login")
    public AjaxResult logout() {
        String json = "{\"account\": \"xuliang\",\"id\": \"D79ADFDAB16C4CFB86345E8DD4379C9E\",\"idCard\": \"350103199012074513\",\"mobile\": \"13655971886\",\"name\": \"郭旭亮\",\"orgId\": \"FJTY001\",\"orgName\": \"福建省体育局\",\"tgt\": \"TGT-34-7K4aNGvp54DtNsgncPixxd5LqaN1PFjH6ANH0qSBgqmPvuJk-5xwOFu0ywnV3aGW1FQlocalhost\",\"token\": \"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJENzlBREZEQUIxNkM0Q0ZCODYzNDVFOERENDM3OUM5RSIsIktFWV9VU0VSX1NUIjoiU1QtMzc1LXotT00yRS14cTF1bnEyOUxLSDNqSVRnaXd2VWxvY2FsaG9zdCIsImV4cCI6MTY1MDkwNzIwNCwiaWF0IjoxNjUwODc4NDA0LCJqdGkiOiIzMDMxZDlkMzRlMmU0Mjk1YTYxNWEzYmEzOTJkZGRiNCJ9.n8yyp6apKR939v00_idHet_TT4JgHKlZhpw5OOkarMKLelyH5qJH6Jf3moG7wtxVdJVMph7ob8VjxSE0ESDsLA\",\"type\": null}";
        UserInfo bean = JSONUtil.toBean(json, UserInfo.class);
        return success(bean);
    }
}

